package service;

import pojo.vo.BookRecordVo;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-12-06
 * Time: 17:33
 */
public interface BookRecordService {

    /**
     * 用户借书的方法
     * @param bookId 书的id
     * @param userId  用户账号
     * @param loanDay 借阅天数
     * @param loanNumber 借阅数量
     * @return
     */
    public boolean LendBook(Long bookId, String userId, Long loanDay, Long loanNumber);

    /**
     * 添加借阅记录的方法
     * @param bookName
     * @param userId
     * @param loanDay
     * @param loanNumber
     * @return
     */
    public boolean addBookRecord(String bookName, String userId, Long loanDay, Long loanNumber);

    /**
     * 归还借阅记录
     * @param recordId 选中记录的id
     * @param bookName 选中书籍的名称
     * @param returnNumber 归还的数量
     * @param account 归还的用户账号
     * @return
     */
    public boolean deleteRecord(Long recordId,String bookName, Long returnNumber,String account);

    /**
     * 归还图书
     * @param recordId
     * @param bookName
     * @param returnNumber
     * @param account
     * @return
     */
    public boolean returnRecord(Long recordId, String bookName, Long returnNumber, String account);
    /**
     * 显示所有借阅记录
     */
     public List<BookRecordVo> listBookRecord();

    /**
     * 根据用户id显示该用户的借阅记录
     */
    public List<BookRecordVo> listBookRecordByAccount(String account);

    /**
     * 逾期修改 逾期状态
     */
     public boolean setOverDue(Long recordId);

    /**
     * 修改罚款金额
     */
    public boolean setFineMoney(Double fineMoney, Long recordId);
}
